<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    *{margin:0; padding:0;}
    .container{position:fixed; left:0; right:0; top:0; bottom:0; background-color:rgba(0,0,0,0.7); text-align:center; vertical-align:middle; font-size:0;}
    .container:after{content:'';display:inline-block; height:100%; vertical-align:middle; width:2px; background:#f00;}
    .dialog{background:#fff; width:200px; display:inline-block; text-align:left;font-size:18px;vertical-align:middle;}
    
  </style>
</head>
<body>
  <div class="container">
    <div class="dialog">测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试</div>
  </div>
</body>
</html>